package com.onec.service.api.exception;

import com.onec.service.api.enums.ResultCodeEnum;
import com.onec.service.api.enums.error.ManageErrorEnum;

/**
 * @author onec
 */
public class ManageException extends BaseException {

    public ManageException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }

    public ManageException(ManageErrorEnum manageErrorEnum) {
        this.code = manageErrorEnum.getCode();
        this.message = manageErrorEnum.getMessage();
    }

    public ManageException(Integer code, String message) {
        super(code, message);
    }
}
